import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'amfe-flexible/index.js'
import fastclick from 'fastclick'
import VueLazyLoad from 'vue-lazyload'
import '@/assets/fonts/DIN/font.css'
import VueCookies from 'vue-cookies'

import {
  setCookie,
  getCookie,
  delCookie,
  clearAllCookie
} from '@/utils/cookie'
Vue.prototype.$cookieStore = {
  setCookie,
  getCookie,
  delCookie,
  clearAllCookie
}

fastclick.attach(document.body);
import {
  Loading,
  Toast
} from "vant";
Vue.use(Loading);
Vue.use(Toast);
Vue.use(VueCookies)


Vue.filter('playNumFormat', function (playCount) {
  if (playCount > 100000000) {
    return ((playCount / 100000000).toFixed(1)) + '亿'
  } else if (playCount > 100000) {
    return parseInt(playCount / 10000) + '万'
  }
  return playCount
});




Vue.use(VueLazyLoad, {
  loading: '/Music_H5/imgs/loading-svg/music_bubble.svg'
});
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');


// let temp = new Date();

// function f() {
//   console.log(temp);
//   if (false) {
//     var temp = '123'
//     console.log(temp);
//   }
// }
// f()
